package JZOffer;

import java.util.HashMap;

/**
 * @author Lw中
 * @date 2021/9/5 9:50
 */
public class Jz10II {

    // Jz10 II.青蛙跳台阶问题
    HashMap<Integer, Integer> map1 = new HashMap();
    public int numWays(int n) {
        if (n <= 1) return 1;
        if (map1.containsKey(n)) {

        } else {
            map1.put(n, (numWays(n - 1) + numWays(n - 2)) % 1000000007);
        }
        return map1.get(n);
    }

}
